<?php
declare (strict_types=1);

use think\facade\Route;

//前缀
$group_name = 'V2_Way_2_0';
$controller = 'app\scan_bag\controller\V2_Way_2_0';
/**
 * 微信扫码取袋(不需要登录)
 */
Route::group($group_name, function () use ($controller) {
    //公众号开始
    Route::post('wechatLogin$', $controller . '@wechatLogin')->name('微信H5用户登录');
    //微信小程序
    Route::post('miniProgramLogin$', $controller . '@miniProgramLogin')->name('微信小程序用户登录');

})->middleware(middleware\NoAuthMiddleware::class, 'scan_bag');

/**
 * 微信扫码取袋(需要登录)
 */
Route::group($group_name, function () use ($controller) {

    Route::get('userScanNum$', $controller . '@userScanNum')->name('微信H5用户取袋次数');
    Route::get('wechatQrcode$', $controller . '@wechatQrcode')->name('微信H5公众号二维码');
    Route::get('wechatQrcodeDiscern$', $controller . '@qrcodeDiscern')->name('微信H5识别二维码');
    Route::any('getJsApiConfig$', $controller . '@jsApiConfig')->name('微信H5获取JSAPI配置');
    Route::post('wechatLatLon$', $controller . '@wechatLatLon')->name('微信上传经纬度信息');
    Route::post('wechatURLScheme$', $controller . '@getURLScheme')->name('微信小程序URLScheme');
    Route::get('miniProgramAdvert$', $controller . '@miniProgramAdvert')->name('微信小程序广告ID');
    Route::post('wechatPostOutBag$', $controller . '@postOutBag')->name('微信取袋码出袋');
    Route::post('wechatPayOrder$', $controller . '@wechatPayOrder')->name('微信取袋发起支付');

})->middleware(middleware\AuthMiddleware::class, 'scan_bag');



